package com.vhall.component.controller.pay;

import com.vhall.component.controller.pay.facade.PaymentFacade;
import com.vhall.component.entity.pay.vo.PaymentParamVO;
import com.vhall.component.framework.common.annotation.VhallComponent;
import com.vhall.component.service.pay.PaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Map;

/**
 * @author lsl
 * @since 2021/7/5
 */
@VhallComponent
@Slf4j
public class PaymentController implements PaymentFacade {

    @Autowired
    private PaymentService paymentService;

    @Override
    public Boolean tradeNoInsertCache(Map<String, Object> data) {
        return paymentService.tradeNoInsertCache(data);
    }

    @Override
    public Map<String, Object> getTradeNoCache(String tradeNo) {
        return paymentService.getTradeNoCache(tradeNo);
    }

    @Override
    public Object genPayment(PaymentParamVO reqVO) {
        return paymentService.genPayment(reqVO);
    }
}
